﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.SharePoint.WebPartPages;
using System.Xml;
using System.Web.UI;
using Microsoft.SharePoint;

namespace WebPartHub.SharePoint
{
    /// <summary>
    /// TODO
    /// </summary>
    public class WebPartHubGalleryItem : WebPartGalleryXmlItemBase
    {
        private readonly string _url;
        private readonly string _webPartCategory;

        public WebPartHubGalleryItem(WebPartGallerySource source, Page page, XmlDocument doc, string url, string webPartCategory)
            : base(source, page, doc)
        {
            _url = url;
            _webPartCategory = webPartCategory;
        }

        public override string Category
        {
            get
            {
                return _webPartCategory;
            }
        }

        public override string Id
        {
            get
            {
                return _url.ToLowerInvariant();
            }
        }


    }
}
